package com.juc.cyclicbarrier.cyclicbarrier8;

public class Run {

	public static void main(String[] args) throws InterruptedException {
		MyService myService = new MyService();
		MyThreadA a = new MyThreadA(myService);
		a.setName("A");
		MyThreadB b = new MyThreadB(myService);
		b.setName("B");
		//线程C 未实例化
		//MyThreadB c = new MyThreadB(myService);
		//c.setName("C");
		a.start();
		b.start();
		//c.start();
		Thread.sleep(2000);
		myService.cyclicBarrier.reset();
	}
}
